package com.tpshion.cloud.common.support;

/**
 * 常量定义
 */
public class Constants {

    /*过期时间,默认设置10分钟 */
    public static final long TOKEN_EXPIRE_TIME = 60;

    /* ISSUER */
    public static final String ISSUER = "chen";

    /* secretKey */
    public static final String SECRET_KEY = "tpshion-cloud";

    /* 编码方式 */
    public static final String CHARSET = "UTF-8";

    /* 邮箱正则 */
    public static final String EMAIL_REGEXP = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$";

    /* 手机号正则 */
    public static final String PHONE_REGEXP = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$";

    /* 正整数正则 */
    public static final String INTEGER_REGEXP = "^[1-9]+[0-9]*$";

    /* 账号正则：3到20位（字母，数字，下划线，减号） */
    public static final String ACCOUNT_REGEXP = "^[a-zA-Z0-9_-]{3,20}$";

    /* 密码正则：6到20位（字母，数字，下划线，减号） */
    public static final String PASSWORD_REGEXP = "^[a-zA-Z0-9_-]{6,20}$";

    /* url正则 */
    public static final String URL_REGEXP = "^((ht|f)tps?):\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+([\\w\\-.,@?^=%&:\\/~+#]*[\\w\\-@?^=%&\\/~+#])?$";

    /* 用户状态：启用 */
    public static final String USER_S = "S";

    /* 用户状态：停用 */
    public static final String USER_F = "F";

    /* 用户状态：废弃 */
    public static final String USER_A = "A";

    /* 用户状态：锁定 */
    public static final String USER_L = "L";

    /* 用户状态：审核 */
    public static final String USER_V = "V";

    /*过期时间,默认设置10分钟 */
    public static final long EXPIRE_TIME = 10;
}
